using Microsoft.Phone.Controls.Maps.PlatformServices;
using System;
using System.ServiceModel;
using System.ServiceModel.Channels;
namespace Microsoft.Phone.Controls.Maps.Core
{
	internal static class WebServicesUtility
	{
		internal static ImageryServiceClient CreateImageryServiceClient(string imageryServiceAddress)
		{
			imageryServiceAddress = imageryServiceAddress.Replace("{UriScheme}", "HTTP");
			HttpTransportBindingElement httpTransportBindingElement = new HttpTransportBindingElement();
			CustomBinding binding = new CustomBinding(new BindingElement[]
			{
				new BinaryMessageEncodingBindingElement(),
				httpTransportBindingElement
			});
			return new ImageryServiceClient(binding, new EndpointAddress(imageryServiceAddress));
		}
	}
}
